import java.util.Scanner;

public class HomeWork12_09{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        ArrPalindrome ap = new ArrPalindrome();
        
        System.out.print("please enter arr length: ");
        int n = scan.nextInt();
        int[] arr = new int[n];
        System.out.print("please enter " + n + " integers: ");
        for(int i = 0; i < n; i++){
            arr[i] = scan.nextInt();
        }
        
        System.out.print(ap.isArrPalindrome(arr));
    }
}

class ArrPalindrome{
    public boolean isArrPalindrome(int[] arr){
        int j = arr.length - 1;
        for(int i = 0; i < arr.length / 2; i++, j--){
            if(arr[i] != arr[j]){
                return false;
            }
        }
        return true;
    }
}